package com.xinqi.modules.course.course.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xinqi.common.mybatis.data.entity.BaseEntity;
import com.xinqi.modules.course.course.enums.CourseArchiveStatusEnum;
import com.xinqi.modules.course.course.enums.CourseStatusEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * 课程表实体层
 *
 * @author: system
 * @date: 2023/01/17
 */
@Setter
@Getter
@TableName("co_course")
public class CourseEntity extends BaseEntity {
    /**
     * 学校ID
     */
    @TableField(value = "school_id")
    private Long schoolId;
    /**
     * 拥有者ID
     */
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 课程名称
     */
    @TableField(value = "course_name")
    private String courseName;
    /**
     * 课程介绍
     */
    @TableField(value = "introduce", updateStrategy = FieldStrategy.IGNORED)
    private String introduce;

    /**
     * 课程背景颜色
     */
    @TableField(value = "course_color_bg")
    private String courseColorBg;

    /**
     * 课程封面
     */
    @TableField(value = "course_color_cover")
    private String courseColorCover;
    /**
     * 课程背景APP端
     */
    @TableField(value = "course_image_cover_app")
    private String courseImageCoverApp;
    /**
     * 课程背景PC端
     */
    @TableField(value = "course_image_cover_pc")
    private String courseImageCoverPc;
    /**
     * 状态，1-正常；2-归档；3-已解散
     */
    @TableField(value = "status")
    private CourseStatusEnum status;
    /**
     * 是否置顶
     */
    @TableField(value = "is_top")
    private Integer isTop;
    /**
     * 是否退出
     */
    @TableField(value = "is_del")
    private Integer isDel;

    /**
     * 名称是否可编辑,0-不可编辑，1-可编辑，默认为1
     */
    @TableField(value = "is_name_editable")
    private Integer isNameEditable;

    /**
     * 课程名称已修改次数
     */
    @TableField(value = "name_edit_count")
    private Integer nameEditCount;

    /**
     * 1归档自己，2归档全班
     */
    @TableField(value = "archive")
    private CourseArchiveStatusEnum archive;
    /**
     * 文件地址
     */
    @TableField(value = "file_url")
    private String fileUrl;
    /**
     * 链接地址
     */
    @TableField(value = "link")
    private String link;
    /**
     * 扩展字段
     */
    @TableField(value = "extend")
    private String extend;

    /**
     * 云课本id
     */
    @TableField(value = "cloud_textbook_id")
    private Long cloudTextbookId;

    /**
     * 云课本名称
     */
    @TableField(value = "cloud_textbook_name")
    private String cloudTextbookName;


    /**
     * 云课本封面图
     */
    @TableField(value = "cloud_textbook_cover_image")
    private String cloudTextbookCoverImage;
}
